﻿using System;
using System.Collections;

namespace XMLParsers.DOM
{
    public class XmlDomElements : CollectionBase
    {
        public XmlDomElements() 
        {
        }

        public void Add(XmlDomElement element)
        {
            List.Add(element);
        }

        public XmlDomElement Item(int index)
        {
            return (XmlDomElement)this.List[index];
        }

        public Object[] ToArray() 
        {
         var objects = new Object[List.Count];
         for (var i=0; i < List.Count; i++) 
         {
            objects[i] = List[i];
         }
         return objects;
      }
    }
}
